package com.zrfintech.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zrfintech.common.pojo.BasePageEntity;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.zrfintech.domain.MgRolePageOptionPermission;
import com.zrfintech.dao.MgRolePageOptionPermissionDao;
@Service
public class MgRolePageOptionPermissionRepoI{

   @Autowired
   protected MgRolePageOptionPermissionDao dao;

   public MgRolePageOptionPermission getById(Long id) {
      return dao.selectById(id);
   }

   public List<MgRolePageOptionPermission> getAll() {
      return dao.selectList(null);
   }

   public int deleteById(Long id) {
      return dao.deleteById(id);
   }

   public int create(MgRolePageOptionPermission item) {
      return dao.create(item);
   }

   public int updateById(MgRolePageOptionPermission item) {
      return dao.updateById(item);
   }

   public boolean hasById(Long id) {
      return dao.selectById(id) == null;
   }

   public Page<MgRolePageOptionPermission> pageList(BasePageEntity basePageEntity, QueryWrapper<MgRolePageOptionPermission> queryWrapper) {
      Page<MgRolePageOptionPermission> rowPage = new Page(basePageEntity.getPage(), basePageEntity.getPerPage());
      return dao.selectPage(rowPage, queryWrapper);
   }

   public static final String ID_COLUMN = "id";

   public static final String ROLE_CODE_COLUMN = "role_code";

   public static final String PAGE_OPTION_CODE_COLUMN = "page_option_code";

   public static final String CTS_COLUMN = "cts";

   public static final String UTS_COLUMN = "uts";
}
